package com.atguigu.product.service.impl;
import java.math.BigDecimal;

import com.atguigu.product.bean.Product;
import com.atguigu.product.service.ProductService;
import org.springframework.stereotype.Service;

@Service
public class ProductServiceImpl implements ProductService {

    @Override
    public Product getProductById(long productId){
        Product product = new Product();//选中括号，alt + enter, 可以自动生成所有set方法并调用（使用了插件GenerateAllSetters）
        product.setId(productId);
        product.setPrice(new BigDecimal("99.8"));
        product.setProductName("阿尔图 - "+productId);
        product.setNum(2);

        return product;
    }
}
